home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_emacs.idb / usr / freeware / info / emacs-17.z / emacs-17
Encoding:
GNU Info File  |  1998-10-28  |  45.8 KB  |  1,191 lines

  1. This is Info file ../info/emacs, produced by Makeinfo-1.63 from the
  2. input file emacs.texi.
  3.  
  4. 
  5. File: emacs,  Node: Dired Updating,  Next: Dired and Find,  Prev: Hiding Subdirectories,  Up: Dired
  6.  
  7. Updating the Dired Buffer
  8. =========================
  9.  
  10.    This section describes commands to update the Dired buffer to reflect
  11. outside (non-Dired) changes in the directories and files, and to delete
  12. part of the Dired buffer.
  13.  
  14. `g'
  15.      Update the entire contents of the Dired buffer (`revert-buffer').
  16.  
  17. `l'
  18.      Update the specified files (`dired-do-redisplay').
  19.  
  20. `k'
  21.      Delete the specified *file lines*--not the files, just the lines
  22.      (`dired-do-kill-lines').
  23.  
  24. `s'
  25.      Toggle between sorting by file name and sorting by date/time
  26.      (`dired-sort-toggle-or-edit').
  27.  
  28. `C-u s SWITCHES RET'
  29.      Refresh the Dired buffer using SWITCHES as
  30.      `dired-listing-switches'.
  31.  
  32.    Type `g' (`revert-buffer') to update the contents of the Dired
  33. buffer, based on changes in the files and directories listed.  This
  34. preserves all marks except for those on files that have vanished.
  35. Hidden subdirectories are updated but remain hidden.
  36.  
  37.    To update only some of the files, type `l' (`dired-do-redisplay').
  38. This command applies to the next N files, or to the marked files if
  39. any, or to the current file.  Updating them means reading their current
  40. status from the file system and changing the buffer to reflect it
  41. properly.
  42.  
  43.    If you use `l' on a subdirectory header line, it updates the
  44. contents of the corresponding subdirectory.
  45.  
  46.    To delete the specified *file lines*--not the files, just the
  47. lines--type `k' (`dired-do-kill-lines').  This command applies to the
  48. next N files, or to the marked files if any, or to the current file.
  49.  
  50.    If you kill the line for a file that is a directory, the directory's
  51. contents are also deleted from the buffer.  Typing `C-u k' on the
  52. header line for a subdirectory is another way to delete a subdirectory
  53. from the Dired buffer.
  54.  
  55.    The `g' command brings back any individual lines that you have
  56. killed in this way, but not subdirectories--you must use `i' to
  57. reinsert each subdirectory.
  58.  
  59.    The files in a Dired buffers are normally in listed alphabetical
  60. order by file names.  Alternatively Dired can sort them by date/time.
  61. The Dired command `s' (`dired-sort-toggle-or-edit') switches between
  62. these two sorting modes.  The mode line in a Dired buffer indicates
  63. which way it is currently sorted--by name, or by date.
  64.  
  65.    `C-u s SWITCHES RET' lets you specify a new value for
  66. `dired-listing-switches'.
  67.  
  68. 
  69. File: emacs,  Node: Dired and Find,  Prev: Dired Updating,  Up: Dired
  70.  
  71. Dired and `find'
  72. ================
  73.  
  74.    You can select a set of files for display in a Dired buffer more
  75. flexibly by using the `find' utility to choose the files.
  76.  
  77.    To search for files with names matching a wildcard pattern use `M-x
  78. find-name-dired'.  It reads arguments DIRECTORY and PATTERN, and
  79. chooses all the files in DIRECTORY or its subdirectories whose
  80. individual names match PATTERN.
  81.  
  82.    The files thus chosen are displayed in a Dired buffer in which the
  83. ordinary Dired commands are available.
  84.  
  85.    If you want to test the contents of files, rather than their names,
  86. use `M-x find-grep-dired'.  This command reads two minibuffer
  87. arguments, DIRECTORY and REGEXP; it chooses all the files in DIRECTORY
  88. or its subdirectories that contain a match for REGEXP.  It works by
  89. running the programs `find' and `grep'.
  90.  
  91.    The most general command in this series is `M-x find-dired', which
  92. lets you specify any condition that `find' can test.  It takes two
  93. minibuffer arguments, DIRECTORY and FIND-ARGS; it runs `find' in
  94. DIRECTORY, passing FIND-ARGS to tell `find' what condition to test.  To
  95. use this command, you need to know how to use `find'.
  96.  
  97.    The format of listing produced by these commands is controlled by the
  98. variable `find-ls-option', whose default value specifies using options
  99. `-ldi' for `ls'.  If your listings are corrupted, you may need to
  100. change the value of this variable.
  101.  
  102. 
  103. File: emacs,  Node: Calendar/Diary,  Next: Gnus,  Prev: Dired,  Up: Top
  104.  
  105. The Calendar and the Diary
  106. **************************
  107.  
  108.    Emacs provides the functions of a desk calendar, with a diary of
  109. planned or past events.  To enter the calendar, type `M-x calendar';
  110. this displays a three-month calendar centered on the current month, with
  111. point on the current date.  With a numeric argument, as in `C-u M-x
  112. calendar', it prompts you for the month and year to be the center of the
  113. three-month calendar.  The calendar uses its own buffer, whose major
  114. mode is Calendar mode.
  115.  
  116.    `Mouse-2' in the calendar brings up a menu of operations on a
  117. particular date; `C-Mouse-3' brings up a menu of commonly used calendar
  118. features that are independent of any particular date.  To exit the
  119. calendar, type `q'.  *Note Customizing the Calendar and Diary:
  120. (elisp)Calendar, for customization information about the calendar and
  121. diary.
  122.  
  123. * Menu:
  124.  
  125. * Calendar Motion::       Moving through the calendar; selecting a date.
  126. * Scroll Calendar::       Bringing earlier or later months onto the screen.
  127. * Counting Days::         How many days are there between two dates?
  128. * General Calendar::      Exiting or recomputing the calendar.
  129. * TeX Calendar::          Print a calendar using TeX.
  130. * Holidays::              Displaying dates of holidays.
  131. * Sunrise/Sunset::        Displaying local times of sunrise and sunset.
  132. * Lunar Phases::          Displaying phases of the moon.
  133. * Other Calendars::       Converting dates to other calendar systems.
  134. * Diary::                 Displaying events from your diary.
  135. * Appointments::      Reminders when it's time to do something.
  136. * Daylight Savings::      How to specify when daylight savings time is active.
  137.  
  138. 
  139. File: emacs,  Node: Calendar Motion,  Next: Scroll Calendar,  Up: Calendar/Diary
  140.  
  141. Movement in the Calendar
  142. ========================
  143.  
  144.    Calendar mode lets you move through the calendar in logical units of
  145. time such as days, weeks, months, and years.  If you move outside the
  146. three months originally displayed, the calendar display "scrolls"
  147. automatically through time to make the selected date visible.  Moving to
  148. a date lets you view its holidays or diary entries, convert it to other
  149. calendars; moving longer time periods is also useful simply to scroll
  150. the calendar.
  151.  
  152. * Menu:
  153.  
  154. * Calendar Unit Motion::      Moving by days, weeks, months, and years.
  155. * Move to Beginning or End::  Moving to start/end of weeks, months, and years.
  156. * Specified Dates::           Moving to the current date or another
  157.                                 specific date.
  158.  
  159. 
  160. File: emacs,  Node: Calendar Unit Motion,  Next: Move to Beginning or End,  Up: Calendar Motion
  161.  
  162. Motion by Standard Lengths of Time
  163. ----------------------------------
  164.  
  165.    The commands for movement in the calendar buffer parallel the
  166. commands for movement in text.  You can move forward and backward by
  167. days, weeks, months, and years.
  168.  
  169. `C-f'
  170.      Move point one day forward (`calendar-forward-day').
  171.  
  172. `C-b'
  173.      Move point one day backward (`calendar-backward-day').
  174.  
  175. `C-n'
  176.      Move point one week forward (`calendar-forward-week').
  177.  
  178. `C-p'
  179.      Move point one week backward (`calendar-backward-week').
  180.  
  181. `M-}'
  182.      Move point one month forward (`calendar-forward-month').
  183.  
  184. `M-{'
  185.      Move point one month backward (`calendar-backward-month').
  186.  
  187. `C-x ]'
  188.      Move point one year forward (`calendar-forward-year').
  189.  
  190. `C-x ['
  191.      Move point one year backward (`calendar-forward-year').
  192.  
  193.    The day and week commands are natural analogues of the usual Emacs
  194. commands for moving by characters and by lines.  Just as `C-n' usually
  195. moves to the same column in the following line, in Calendar mode it
  196. moves to the same day in the following week.  And `C-p' moves to the
  197. same day in the previous week.
  198.  
  199.    The arrow keys are equivalent to `C-f', `C-b', `C-n' and `C-p', just
  200. as they normally are in other modes.
  201.  
  202.    The commands for motion by months and years work like those for
  203. weeks, but move a larger distance.  The month commands `M-}' and `M-{'
  204. move forward or backward by an entire month's time.  The year commands
  205. `C-x ]' and `C-x [' move forward or backward a whole year.
  206.  
  207.    The easiest way to remember these commands is to consider months and
  208. years analogous to paragraphs and pages of text, respectively.  But the
  209. commands themselves are not quite analogous.  The ordinary Emacs
  210. paragraph commands move to the beginning or end of a paragraph, whereas
  211. these month and year commands move by an entire month or an entire
  212. year, which usually involves skipping across the end of a month or year.
  213.  
  214.    All these commands accept a numeric argument as a repeat count.  For
  215. convenience, the digit keys and the minus sign specify numeric
  216. arguments in Calendar mode even without the Meta modifier.  For example,
  217. `100 C-f' moves point 100 days forward from its present location.
  218.  
  219. 
  220. File: emacs,  Node: Move to Beginning or End,  Next: Specified Dates,  Prev: Calendar Unit Motion,  Up: Calendar Motion
  221.  
  222. Beginning or End of Week, Month or Year
  223. ---------------------------------------
  224.  
  225.    A week (or month, or year) is not just a quantity of days; we think
  226. of weeks (months, years) as starting on particular dates.  So Calendar
  227. mode provides commands to move to the beginning or end of a week, month
  228. or year:
  229.  
  230. `C-a'
  231.      Move point to start of week (`calendar-beginning-of-week').
  232.  
  233. `C-e'
  234.      Move point to end of week (`calendar-end-of-week').
  235.  
  236. `M-a'
  237.      Move point to start of month (`calendar-beginning-of-month').
  238.  
  239. `M-e'
  240.      Move point to end of month (`calendar-end-of-month').
  241.  
  242. `M-<'
  243.      Move point to start of year (`calendar-beginning-of-year').
  244.  
  245. `M->'
  246.      Move point to end of year (`calendar-end-of-year').
  247.  
  248.    These commands also take numeric arguments as repeat counts, with the
  249. repeat count indicating how many weeks, months, or years to move
  250. backward or forward.
  251.  
  252.    By default, weeks begin on Sunday.  To make them begin on Monday
  253. instead, set the variable `calendar-week-start-day' to 1.
  254.  
  255. 
  256. File: emacs,  Node: Specified Dates,  Prev: Move to Beginning or End,  Up: Calendar Motion
  257.  
  258. Specified Dates
  259. ---------------
  260.  
  261.    Calendar mode provides commands for moving to a particular date
  262. specified in various ways.
  263.  
  264. `g d'
  265.      Move point to specified date (`calendar-goto-date').
  266.  
  267. `o'
  268.      Center calendar around specified month (`calendar-other-month').
  269.  
  270. `.'
  271.      Move point to today's date (`calendar-goto-today').
  272.  
  273.    `g d' (`calendar-goto-date') prompts for a year, a month, and a day
  274. of the month, and then moves to that date.  Because the calendar
  275. includes all dates from the beginning of the current era, you must type
  276. the year in its entirety; that is, type `1990', not `90'.
  277.  
  278.    `o' (`calendar-other-month') prompts for a month and year, then
  279. centers the three-month calendar around that month.
  280.  
  281.    You can return to today's date with `.' (`calendar-goto-today').
  282.  
  283. 
  284. File: emacs,  Node: Scroll Calendar,  Next: Counting Days,  Prev: Calendar Motion,  Up: Calendar/Diary
  285.  
  286. Scrolling in the Calendar
  287. =========================
  288.  
  289.    The calendar display scrolls automatically through time when you
  290. move out of the visible portion.  You can also scroll it manually.
  291. Imagine that the calendar window contains a long strip of paper with
  292. the months on it.  Scrolling it means moving the strip so that new
  293. months become visible in the window.
  294.  
  295. `C-x <'
  296.      Scroll calendar one month forward (`scroll-calendar-left').
  297.  
  298. `C-x >'
  299.      Scroll calendar one month backward (`scroll-calendar-right').
  300.  
  301. `C-v'
  302. `NEXT'
  303.      Scroll calendar three months forward
  304.      (`scroll-calendar-left-three-months').
  305.  
  306. `M-v'
  307. `PRIOR'
  308.      Scroll calendar three months backward
  309.      (`scroll-calendar-right-three-months').
  310.  
  311.    The most basic calendar scroll commands scroll by one month at a
  312. time.  This means that there are two months of overlap between the
  313. display before the command and the display after.  `C-x <' scrolls the
  314. calendar contents one month to the left; that is, it moves the display
  315. forward in time.  `C-x >' scrolls the contents to the right, which
  316. moves backwards in time.
  317.  
  318.    The commands `C-v' and `M-v' scroll the calendar by an entire
  319. "screenful"--three months--in analogy with the usual meaning of these
  320. commands.  `C-v' makes later dates visible and `M-v' makes earlier
  321. dates visible.  These commands take a numeric argument as a repeat
  322. count; in particular, since `C-u' multiplies the next command by four,
  323. typing `C-u C-v' scrolls the calendar forward by a year and typing `C-u
  324. M-v' scrolls the calendar backward by a year.
  325.  
  326.    The function keys NEXT and PRIOR are equivalent to `C-v' and `M-v',
  327. just as they are in other modes.
  328.  
  329. 
  330. File: emacs,  Node: Counting Days,  Next: General Calendar,  Prev: Scroll Calendar,  Up: Calendar/Diary
  331.  
  332. Counting Days
  333. =============
  334.  
  335. `M-='
  336.      Display the number of days in the current region
  337.      (`calendar-count-days-region').
  338.  
  339.    To determine the number of days in the region, type `M-='
  340. (`calendar-count-days-region').  The numbers of days printed is
  341. *inclusive*; that is, it includes the days specified by mark and point.
  342.  
  343. 
  344. File: emacs,  Node: General Calendar,  Next: TeX Calendar,  Prev: Counting Days,  Up: Calendar/Diary
  345.  
  346. Miscellaneous Calendar Commands
  347. ===============================
  348.  
  349. `p d'
  350.      Display day-in-year (`calendar-print-day-of-year').
  351.  
  352. `C-c C-l'
  353.      Regenerate the calendar window (`redraw-calendar').
  354.  
  355. `SPC'
  356.      Scroll the next window (`scroll-other-window').
  357.  
  358. `q'
  359.      Exit from calendar (`exit-calendar').
  360.  
  361.    To print the number of days elapsed since the start of the year, or
  362. the number of days remaining in the year, type the `p d' command
  363. (`calendar-print-day-of-year').  This displays both of those numbers in
  364. the echo area.  The number of days elapsed includes the selected date.
  365. The number of days remaining does not include that date.
  366.  
  367.    If the calendar window text gets corrupted, type `C-c C-l'
  368. (`redraw-calendar') to redraw it.  (This can only happen if you use
  369. non-Calendar-mode editing commands.)
  370.  
  371.    In Calendar mode, you can use `SPC' (`scroll-other-window') to
  372. scroll the other window.  This is handy when you display a list of
  373. holidays or diary entries in another window.
  374.  
  375.    To exit from the calendar, type `q' (`exit-calendar').  This buries
  376. all buffers related to the calendar, selecting other buffers.  (If a
  377. frame contains a dedicated calendar window, exiting from the calendar
  378. iconifies that frame.)
  379.  
  380. 
  381. File: emacs,  Node: TeX Calendar,  Next: Holidays,  Prev: General Calendar,  Up: Calendar/Diary
  382.  
  383. TeX Calendar
  384. ============
  385.  
  386.    The Calendar TeX commands produce a buffer of LaTeX code that prints
  387. as a calendar.  Depending on the command you use, the printed calendar
  388. covers the day, week, month or year that point is in.
  389.  
  390. `t m'
  391.      Generate a one-month calendar (`cal-tex-cursor-month').
  392.  
  393. `t M'
  394.      Generate a sideways-printing one-month calendar
  395.      (`cal-tex-cursor-month-landscape').
  396.  
  397. `t d'
  398.      Generate a one-day calendar (`cal-tex-cursor-day').
  399.  
  400. `t w 1'
  401.      Generate a one-page calendar for one week (`cal-tex-cursor-week').
  402.  
  403. `t w 2'
  404.      Generate a two-page calendar for one week (`cal-tex-cursor-week2').
  405.  
  406. `t w 3'
  407.      Generate an ISO-style calendar for one week
  408.      (`cal-tex-cursor-week-iso').
  409.  
  410. `t w 4'
  411.      Generate a calendar for one Monday-starting week
  412.      (`cal-tex-cursor-week-monday').
  413.  
  414. `t f w'
  415.      Generate a Filofax-style two-weeks-at-a-glance calendar
  416.      (`cal-tex-cursor-filofax-2week').
  417.  
  418. `t f W'
  419.      Generate a Filofax-style one-week-at-a-glance calendar
  420.      (`cal-tex-cursor-filofax-week').
  421.  
  422. `t y'
  423.      Generate a calendar for one year (`cal-tex-cursor-year').
  424.  
  425. `t Y'
  426.      Generate a sideways-printing calendar for one year
  427.      (`cal-tex-cursor-landscape-year').
  428.  
  429. `t f y'
  430.      Generate a Filofax-style calendar for one year
  431.      (`cal-tex-cursor-filofax-year').
  432.  
  433.    Some of these commands print the calendar sideways (in "landscape
  434. mode"), so it can be wider than it is long.  Some of them use Filofax
  435. paper size (3.75in x 6.75in).  All of these commands accept a prefix
  436. argument which specifies how many days, weeks, months or years to print
  437. (starting always with the selected one).
  438.  
  439.    If the variable `cal-tex-holidays' is non-`nil' (the default), then
  440. the printed calendars show the holidays in `calendar-holidays'.  If the
  441. variable `cal-tex-diary' is non-`nil' (the default is `nil'), diary
  442. entries are included also (in weekly and monthly calendars only).
  443.  
  444. 
  445. File: emacs,  Node: Holidays,  Next: Sunrise/Sunset,  Prev: TeX Calendar,  Up: Calendar/Diary
  446.  
  447. Holidays
  448. ========
  449.  
  450.    The Emacs calendar knows about all major and many minor holidays,
  451. and can display them.
  452.  
  453. `h'
  454.      Display holidays for the selected date
  455.      (`calendar-cursor-holidays').
  456.  
  457. `Mouse-2 Holidays'
  458.      Display any holidays for the date you click on.
  459.  
  460. `x'
  461.      Mark holidays in the calendar window (`mark-calendar-holidays').
  462.  
  463. `u'
  464.      Unmark calendar window (`calendar-unmark').
  465.  
  466. `a'
  467.      List all holidays for the displayed three months in another window
  468.      (`list-calendar-holidays').
  469.  
  470. `M-x holidays'
  471.      List all holidays for three months around today's date in another
  472.      window.
  473.  
  474.    To see if any holidays fall on a given date, position point on that
  475. date in the calendar window and use the `h' command.  Alternatively,
  476. click on that date with `Mouse-2' and then choose `Holidays' from the
  477. menu that appears.  Either way, this displays the holidays for that
  478. date, in the echo area if they fit there, otherwise in a separate
  479. window.
  480.  
  481.    To view the distribution of holidays for all the dates shown in the
  482. calendar, use the `x' command.  This displays the dates that are
  483. holidays in a different face (or places a `*' after these dates, if
  484. display with multiple faces is not available).  The command applies both
  485. to the currently visible months and to other months that subsequently
  486. become visible by scrolling.  To turn marking off and erase the current
  487. marks, type `u', which also erases any diary marks (*note Diary::.).
  488.  
  489.    To get even more detailed information, use the `a' command, which
  490. displays a separate buffer containing a list of all holidays in the
  491. current three-month range.  You can use SPC in the calendar window to
  492. scroll that list.
  493.  
  494.    The command `M-x holidays' displays the list of holidays for the
  495. current month and the preceding and succeeding months; this works even
  496. if you don't have a calendar window.  If you want the list of holidays
  497. centered around a different month, use `C-u M-x holidays', which
  498. prompts for the month and year.
  499.  
  500.    The holidays known to Emacs include American holidays and the major
  501. Christian, Jewish, and Islamic holidays; also the solstices and
  502. equinoxes.
  503.  
  504.    The dates used by Emacs for holidays are based on *current
  505. practice*, not historical fact.  Historically, for instance, the start
  506. of daylight savings time and even its existence have varied from year to
  507. year, but present American law mandates that daylight savings time
  508. begins on the first Sunday in April.  In an American locale, Emacs
  509. always uses this definition, even though it is wrong for some prior
  510. years.
  511.  
  512. 
  513. File: emacs,  Node: Sunrise/Sunset,  Next: Lunar Phases,  Prev: Holidays,  Up: Calendar/Diary
  514.  
  515. Times of Sunrise and Sunset
  516. ===========================
  517.  
  518.    Special calendar commands can tell you, to within a minute or two,
  519. the times of sunrise and sunset for any date.
  520.  
  521. `S'
  522.      Display times of sunrise and sunset for the selected date
  523.      (`calendar-sunrise-sunset').
  524.  
  525. `Mouse-2 Sunrise/Sunset'
  526.      Display times of sunrise and sunset for the date you click on.
  527.  
  528. `M-x sunrise-sunset'
  529.      Display times of sunrise and sunset for today's date.
  530.  
  531. `C-u M-x sunrise-sunset'
  532.      Display times of sunrise and sunset for a specified date.
  533.  
  534.    Within the calendar, to display the *local times* of sunrise and
  535. sunset in the echo area, move point to the date you want, and type `S'.
  536. Alternatively, click `Mouse-2' on the date, then choose
  537. `Sunrise/Sunset' from the menu that appears.  The command `M-x
  538. sunrise-sunset' is available outside the calendar to display this
  539. information for today's date or a specified date.  To specify a date
  540. other than today, use `C-u M-x sunrise-sunset', which prompts for the
  541. year, month, and day.
  542.  
  543.    You can display the times of sunrise and sunset for any location and
  544. any date with `C-u C-u M-x sunrise-sunset'.  This asks you for a
  545. longitude, latitude, number of minutes difference from Coordinated
  546. Universal Time, and date, and then tells you the times of sunrise and
  547. sunset for that location on that date.
  548.  
  549.    Because the times of sunrise and sunset depend on the location on
  550. earth, you need to tell Emacs your latitude, longitude, and location
  551. name before using these commands.  Here is an example of what to set:
  552.  
  553.      (setq calendar-latitude 40.1)
  554.      (setq calendar-longitude -88.2)
  555.      (setq calendar-location-name "Urbana, IL")
  556.  
  557. Use one decimal place in the values of `calendar-latitude' and
  558. `calendar-longitude'.
  559.  
  560.    Your time zone also affects the local time of sunrise and sunset.
  561. Emacs usually gets time zone information from the operating system, but
  562. if these values are not what you want (or if the operating system does
  563. not supply them), you must set them yourself.  Here is an example:
  564.  
  565.      (setq calendar-time-zone -360)
  566.      (setq calendar-standard-time-zone-name "CST")
  567.      (setq calendar-daylight-time-zone-name "CDT")
  568.  
  569. The value of `calendar-time-zone' is the number of minutes difference
  570. between your local standard time and Coordinated Universal Time
  571. (Greenwich time).  The values of `calendar-standard-time-zone-name' and
  572. `calendar-daylight-time-zone-name' are the abbreviations used in your
  573. time zone.  Emacs displays the times of sunrise and sunset *corrected
  574. for daylight savings time*.  *Note Daylight Savings::, for how daylight
  575. savings time is determined.
  576.  
  577.    As a user, you might find it convenient to set the calendar location
  578. variables for your usual physical location in your `.emacs' file.  And
  579. when you install Emacs on a machine, you can create a `default.el' file
  580. which sets them properly for the typical location of most users of that
  581. machine.  *Note Init File::.
  582.  
  583. 
  584. File: emacs,  Node: Lunar Phases,  Next: Other Calendars,  Prev: Sunrise/Sunset,  Up: Calendar/Diary
  585.  
  586. Phases of the Moon
  587. ==================
  588.  
  589.    These calendar commands display the dates and times of the phases of
  590. the moon (new moon, first quarter, full moon, last quarter).  This
  591. feature is useful for debugging problems that "depend on the phase of
  592. the moon."
  593.  
  594. `M'
  595.      Display the dates and times for all the quarters of the moon for
  596.      the three-month period shown (`calendar-phases-of-moon').
  597.  
  598. `M-x phases-of-moon'
  599.      Display dates and times of the quarters of the moon for three
  600.      months around today's date.
  601.  
  602.    Within the calendar, use the `M' command to display a separate
  603. buffer of the phases of the moon for the current three-month range.  The
  604. dates and times listed are accurate to within a few minutes.
  605.  
  606.    Outside the calendar, use the command `M-x phases-of-moon' to
  607. display the list of the phases of the moon for the current month and the
  608. preceding and succeeding months.  For information about a different
  609. month, use `C-u M-x phases-of-moon', which prompts for the month and
  610. year.
  611.  
  612.    The dates and times given for the phases of the moon are given in
  613. local time (corrected for daylight savings, when appropriate); but if
  614. the variable `calendar-time-zone' is void, Coordinated Universal Time
  615. (the Greenwich time zone) is used.  *Note Daylight Savings::.
  616.  
  617. 
  618. File: emacs,  Node: Other Calendars,  Next: Diary,  Prev: Lunar Phases,  Up: Calendar/Diary
  619.  
  620. Conversion To and From Other Calendars
  621. ======================================
  622.  
  623.    The Emacs calendar displayed is *always* the Gregorian calendar,
  624. sometimes called the "new style" calendar, which is used in most of the
  625. world today.  However, this calendar did not exist before the sixteenth
  626. century and was not widely used before the eighteenth century; it did
  627. not fully displace the Julian calendar and gain universal acceptance
  628. until the early twentieth century.  The Emacs calendar can display any
  629. month since January, year 1 of the current era, but the calendar
  630. displayed is the Gregorian, even for a date at which the Gregorian
  631. calendar did not exist.
  632.  
  633.    While Emacs cannot display other calendars, it can convert dates to
  634. and from several other calendars.
  635.  
  636. * Menu:
  637.  
  638. * Calendar Systems::       The calendars Emacs understands
  639.                  (aside from Gregorian).
  640. * To Other Calendar::       Converting the selected date to various calendars.
  641. * From Other Calendar::       Moving to a date specified in another calendar.
  642. * Mayan Calendar::       Moving to a date specified in a Mayan calendar.
  643.  
  644. 
  645. File: emacs,  Node: Calendar Systems,  Next: To Other Calendar,  Up: Other Calendars
  646.  
  647. Supported Calendar Systems
  648. --------------------------
  649.  
  650.    The ISO commercial calendar is used largely in Europe.
  651.  
  652.    The Julian calendar, named after Julius Caesar, was the one used in
  653. Europe throughout medieval times, and in many countries up until the
  654. nineteenth century.
  655.  
  656.    Astronomers use a simple counting of days elapsed since noon, Monday,
  657. January 1, 4713 B.C. on the Julian calendar.  The number of days elapsed
  658. is called the *Julian day number* or the *Astronomical day number*.
  659.  
  660.    The Hebrew calendar is used by tradition in the Jewish religion.  The
  661. Emacs calendar program uses the Hebrew calendar to determine the dates
  662. of Jewish holidays.  Hebrew calendar dates begin and end at sunset.
  663.  
  664.    The Islamic calendar is used in many predominantly Islamic countries.
  665. Emacs uses it to determine the dates of Islamic holidays.  There is no
  666. universal agreement in the Islamic world about the calendar; Emacs uses
  667. a widely accepted version, but the precise dates of Islamic holidays
  668. often depend on proclamation by religious authorities, not on
  669. calculations.  As a consequence, the actual dates of observance can vary
  670. slightly from the dates computed by Emacs.  Islamic calendar dates begin
  671. and end at sunset.
  672.  
  673.    The French Revolutionary calendar was created by the Jacobins after
  674. the 1789 revolution, to represent a more secular and nature-based view
  675. of the annual cycle, and to install a 10-day week in a rationalization
  676. measure similar to the metric system.  The French government officially
  677. abandoned this calendar at the end of 1805.
  678.  
  679.    The Maya of Central America used three separate, overlapping calendar
  680. systems, the *long count*, the *tzolkin*, and the *haab*.  Emacs knows
  681. about all three of these calendars.  Experts dispute the exact
  682. correlation between the Mayan calendar and our calendar; Emacs uses the
  683. Goodman-Martinez-Thompson correlation in its calculations.
  684.  
  685.    The Copts use a calendar based on the ancient Egyptian solar
  686. calendar.  Their calendar consists of twelve 30-day months followed by
  687. an extra five day period.  Once every fourth year they add a leap day
  688. to this extra period to make it six days.  The Ethiopic calendar is
  689. identical in structure, but has different year numbers and month names.
  690.  
  691.    The Persians use a solar calendar based on a design of Omar Khayyam.
  692. Their calendar consists of twelve months of which the first six have 31
  693. days, the next five have 30 days, and the last has 29 in ordinary years
  694. and 30 in leap years.  Leap years occur in a complicated pattern every
  695. four or five years.
  696.  
  697.    The Chinese calendar is a complicated system of lunar months arranged
  698. into solar years.  The years go in cycles of sixty, each year containing
  699. either twelve months in an ordinary year or thirteen months in a leap
  700. year; each month has either 29 or 30 days.  Years, ordinary months, and
  701. days are named by combining one of ten "celestial stems" with one of
  702. twelve "terrestrial branches" for a total of sixty names that are
  703. repeated in a cycle of sixty.
  704.  
  705. 
  706. File: emacs,  Node: To Other Calendar,  Next: From Other Calendar,  Prev: Calendar Systems,  Up: Other Calendars
  707.  
  708. Converting To Other Calendars
  709. -----------------------------
  710.  
  711.    The following commands describe the selected date (the date at point)
  712. in various other calendar systems:
  713.  
  714. `Mouse-2  Other Calendars'
  715.      Display the date that you click on, expressed in various other
  716.      calendars.
  717.  
  718. `p c'
  719.      Display ISO commercial calendar equivalent for selected day
  720.      (`calendar-print-iso-date').
  721.  
  722. `p j'
  723.      Display Julian date for selected day
  724.      (`calendar-print-julian-date').
  725.  
  726. `p a'
  727.      Display astronomical (Julian) day number for selected day
  728.      (`calendar-print-astro-day-number').
  729.  
  730. `p h'
  731.      Display Hebrew date for selected day
  732.      (`calendar-print-hebrew-date').
  733.  
  734. `p i'
  735.      Display Islamic date for selected day
  736.      (`calendar-print-islamic-date').
  737.  
  738. `p f'
  739.      Display French Revolutionary date for selected day
  740.      (`calendar-print-french-date').
  741.  
  742. `p C'
  743.      Display Chinese date for selected day
  744.      (`calendar-print-chinese-date').
  745.  
  746. `p k'
  747.      Display Coptic date for selected day
  748.      (`calendar-print-coptic-date').
  749.  
  750. `p e'
  751.      Display Ethiopic date for selected day
  752.      (`calendar-print-ethiopic-date').
  753.  
  754. `p p'
  755.      Display Persian date for selected day
  756.      (`calendar-print-persian-date').
  757.  
  758. `p m'
  759.      Display Mayan date for selected day (`calendar-print-mayan-date').
  760.  
  761.    If you are using X, the easiest way to translate a date into other
  762. calendars is to click on it with `Mouse-2', then choose `Other
  763. Calendars' from the menu that appears.  This displays the equivalent
  764. forms of the date in all the calendars Emacs understands, in the form of
  765. a menu.  (Choosing an alternative from this menu doesn't actually do
  766. anything--the menu is used only for display.)
  767.  
  768.    Put point on the desired date of the Gregorian calendar, then type
  769. the appropriate keys.  The `p' is a mnemonic for "print" since Emacs
  770. "prints" the equivalent date in the echo area.
  771.  
  772. 
  773. File: emacs,  Node: From Other Calendar,  Next: Mayan Calendar,  Prev: To Other Calendar,  Up: Other Calendars
  774.  
  775. Converting From Other Calendars
  776. -------------------------------
  777.  
  778.    You can use the other supported calendars to specify a date to move
  779. to.  This section describes the commands for doing this using calendars
  780. other than Mayan; for the Mayan calendar, see the following section.
  781.  
  782. `g c'
  783.      Move to a date specified in the ISO commercial calendar
  784.      (`calendar-goto-iso-date').
  785.  
  786. `g j'
  787.      Move to a date specified in the Julian calendar
  788.      (`calendar-goto-julian-date').
  789.  
  790. `g a'
  791.      Move to a date specified in astronomical (Julian) day number
  792.      (`calendar-goto-astro-day-number').
  793.  
  794. `g h'
  795.      Move to a date specified in the Hebrew calendar
  796.      (`calendar-goto-hebrew-date').
  797.  
  798. `g i'
  799.      Move to a date specified in the Islamic calendar
  800.      (`calendar-goto-islamic-date').
  801.  
  802. `g f'
  803.      Move to a date specified in the French Revolutionary calendar
  804.      (`calendar-goto-french-date').
  805.  
  806. `g C'
  807.      Move to a date specified in the Chinese calendar
  808.      (`calendar-goto-chinese-date').
  809.  
  810. `g p'
  811.      Move to a date specified in the Persian calendar
  812.      (`calendar-goto-persian-date').
  813.  
  814. `g k'
  815.      Move to a date specified in the Coptic calendar
  816.      (`calendar-goto-coptic-date').
  817.  
  818. `g e'
  819.      Move to a date specified in the Ethiopic calendar
  820.      (`calendar-goto-ethiopic-date').
  821.  
  822.    These commands ask you for a date on the other calendar, move point
  823. to the Gregorian calendar date equivalent to that date, and display the
  824. other calendar's date in the echo area.  Emacs uses strict completion
  825. (*note Completion::.) whenever it asks you to type a month name, so you
  826. don't have to worry about the spelling of Hebrew, Islamic, or French
  827. names.
  828.  
  829.    One common question concerning the Hebrew calendar is the computation
  830. of the anniversary of a date of death, called a "yahrzeit."  The Emacs
  831. calendar includes a facility for such calculations.  If you are in the
  832. calendar, the command `M-x list-yahrzeit-dates' asks you for a range of
  833. years and then displays a list of the yahrzeit dates for those years
  834. for the date given by point.  If you are not in the calendar, this
  835. command first asks you for the date of death and the range of years,
  836. and then displays the list of yahrzeit dates.
  837.  
  838. 
  839. File: emacs,  Node: Mayan Calendar,  Prev: From Other Calendar,  Up: Other Calendars
  840.  
  841. Converting from the Mayan Calendar
  842. ----------------------------------
  843.  
  844.    Here are the commands to select dates based on the Mayan calendar:
  845.  
  846. `g m l'
  847.      Move to a date specified by the long count calendar
  848.      (`calendar-goto-mayan-long-count-date').
  849.  
  850. `g m n t'
  851.      Move to the next occurrence of a place in the tzolkin calendar
  852.      (`calendar-next-tzolkin-date').
  853.  
  854. `g m p t'
  855.      Move to the previous occurrence of a place in the tzolkin calendar
  856.      (`calendar-previous-tzolkin-date').
  857.  
  858. `g m n h'
  859.      Move to the next occurrence of a place in the haab calendar
  860.      (`calendar-next-haab-date').
  861.  
  862. `g m p h'
  863.      Move to the previous occurrence of a place in the haab calendar
  864.      (`calendar-previous-haab-date').
  865.  
  866. `g m n c'
  867.      Move to the next occurrence of a place in the calendar round
  868.      (`calendar-next-calendar-round-date').
  869.  
  870. `g m p c'
  871.      Move to the previous occurrence of a place in the calendar round
  872.      (`calendar-previous-calendar-round-date').
  873.  
  874.    To understand these commands, you need to understand the Mayan
  875. calendars.  The "long count" is a counting of days with these units:
  876.  
  877.      1 kin = 1 day   1 uinal = 20 kin   1 tun = 18 uinal
  878.      1 katun = 20 tun   1 baktun = 20 katun
  879.  
  880. Thus, the long count date 12.16.11.16.6 means 12 baktun, 16 katun, 11
  881. tun, 16 uinal, and 6 kin.  The Emacs calendar can handle Mayan long
  882. count dates as early as 7.17.18.13.1, but no earlier.  When you use the
  883. `g m l' command, type the Mayan long count date with the baktun, katun,
  884. tun, uinal, and kin separated by periods.
  885.  
  886.    The Mayan tzolkin calendar is a cycle of 260 days formed by a pair of
  887. independent cycles of 13 and 20 days.  Since this cycle repeats
  888. endlessly, Emacs provides commands to move backward and forward to the
  889. previous or next point in the cycle.  Type `g m p t' to go to the
  890. previous tzolkin date; Emacs asks you for a tzolkin date and moves point
  891. to the previous occurrence of that date.  Similarly, type `g m n t' to
  892. go to the next occurrence of a tzolkin date.
  893.  
  894.    The Mayan haab calendar is a cycle of 365 days arranged as 18 months
  895. of 20 days each, followed a 5-day monthless period.  Like the tzolkin
  896. cycle, this cycle repeats endlessly, and there are commands to move
  897. backward and forward to the previous or next point in the cycle.  Type
  898. `g m p h' to go to the previous haab date; Emacs asks you for a haab
  899. date and moves point to the previous occurrence of that date.
  900. Similarly, type `g m n h' to go to the next occurrence of a haab date.
  901.  
  902.    The Maya also used the combination of the tzolkin date and the haab
  903. date.  This combination is a cycle of about 52 years called a *calendar
  904. round*.  If you type `g m p c', Emacs asks you for both a haab and a
  905. tzolkin date and then moves point to the previous occurrence of that
  906. combination.  Use `g m n c' to move point to the next occurrence of a
  907. combination.  These commands signal an error if the haab/tzolkin date
  908. combination you have typed is impossible.
  909.  
  910.    Emacs uses strict completion (*note Strict Completion::.) whenever it
  911. asks you to type a Mayan name, so you don't have to worry about
  912. spelling.
  913.  
  914. 
  915. File: emacs,  Node: Diary,  Next: Appointments,  Prev: Other Calendars,  Up: Calendar/Diary
  916.  
  917. The Diary
  918. =========
  919.  
  920.    The Emacs diary keeps track of appointments or other events on a
  921. daily basis, in conjunction with the calendar.  To use the diary
  922. feature, you must first create a "diary file" containing a list of
  923. events and their dates.  Then Emacs can automatically pick out and
  924. display the events for today, for the immediate future, or for any
  925. specified date.
  926.  
  927.    By default, Emacs uses `~/diary' as the diary file.  This is the
  928. same file that the `calendar' utility uses.  A sample `~/diary' file is:
  929.  
  930.      12/22/1988  Twentieth wedding anniversary!!
  931.      &1/1.       Happy New Year!
  932.      10/22       Ruth's birthday.
  933.      * 21, *:    Payday
  934.      Tuesday--weekly meeting with grad students at 10am
  935.               Supowit, Shen, Bitner, and Kapoor to attend.
  936.      1/13/89     Friday the thirteenth!!
  937.      &thu 4pm    squash game with Lloyd.
  938.      mar 16      Dad's birthday
  939.      April 15, 1989 Income tax due.
  940.      &* 15       time cards due.
  941.  
  942. This example uses extra spaces to align the event descriptions of most
  943. of the entries.  Such formatting is purely a matter of taste.
  944.  
  945.    Although you probably will start by creating a diary manually, Emacs
  946. provides a number of commands to let you view, add, and change diary
  947. entries.
  948.  
  949. * Menu:
  950.  
  951. * Diary Commands::         Viewing diary entries and associated calendar dates.
  952. * Format of Diary File::   Entering events in your diary.
  953. * Date Formats::       Various ways you can specify dates.
  954. * Adding to Diary::       Commands to create diary entries.
  955. * Special Diary Entries::  Anniversaries, blocks of dates, cyclic entries, etc.
  956.  
  957. 
  958. File: emacs,  Node: Diary Commands,  Next: Format of Diary File,  Up: Diary
  959.  
  960. Commands Displaying Diary Entries
  961. ---------------------------------
  962.  
  963.    Once you have created a `~/diary' file, you can use the calendar to
  964. view it.  You can also view today's events outside of Calendar mode.
  965.  
  966. `d'
  967.      Display all diary entries for the selected date
  968.      (`view-diary-entries').
  969.  
  970. `Mouse-2 Diary'
  971.      Display all diary entries for the date you click on.
  972.  
  973. `s'
  974.      Display the entire diary file (`show-all-diary-entries').
  975.  
  976. `m'
  977.      Mark all visible dates that have diary entries
  978.      (`mark-diary-entries').
  979.  
  980. `u'
  981.      Unmark the calendar window (`calendar-unmark').
  982.  
  983. `M-x print-diary-entries'
  984.      Print hard copy of the diary display as it appears.
  985.  
  986. `M-x diary'
  987.      Display all diary entries for today's date.
  988.  
  989.    Displaying the diary entries with `d' shows in a separate window the
  990. diary entries for the selected date in the calendar.  The mode line of
  991. the new window shows the date of the diary entries and any holidays
  992. that fall on that date.  If you specify a numeric argument with `d', it
  993. shows all the diary entries for that many successive days.  Thus, `2 d'
  994. displays all the entries for the selected date and for the following
  995. day.
  996.  
  997.    Another way to display the diary entries for a date is to click
  998. `Mouse-2' on the date, and then choose `Diary' from the menu that
  999. appears.
  1000.  
  1001.    To get a broader view of which days are mentioned in the diary, use
  1002. the `m' command.  This displays the dates that have diary entries fall
  1003. in a different face (or places a `+' after these dates, if display with
  1004. multiple faces is not available).  The command applies both to the
  1005. currently visible months and to other months that subsequently become
  1006. visible by scrolling.  To turn marking off and erase the current marks,
  1007. type `u', which also turns off holiday marks (*note Holidays::.).
  1008.  
  1009.    To see the full diary file, rather than just some of the entries, use
  1010. the `s' command.
  1011.  
  1012.    Display of selected diary entries uses the selective display feature
  1013. to hide entries that don't apply.  This is the same feature that Outline
  1014. mode uses to show part of an outline (*note Outline Mode::.).
  1015.  
  1016.    The diary buffer as you see it is an illusion, so simply printing the
  1017. buffer does not print what you see on your screen.  There is a special
  1018. command to print hard copy of the diary buffer *as it appears*; this
  1019. command is `M-x print-diary-entries'.  It sends the data directly to
  1020. the printer.  You can customize it like `lpr-region' (*note
  1021. Hardcopy::.).
  1022.  
  1023.    The command `M-x diary' displays the diary entries for the current
  1024. date, independently of the calendar display, and optionally for the next
  1025. few days as well; the variable `number-of-diary-entries' specifies how
  1026. many days to include.  *Note Calendar/Diary Options:
  1027. (elisp)Calendar/Diary Options.
  1028.  
  1029.    If you put `(diary)' in your `.emacs' file, this automatically
  1030. displays a window with the day's diary entries, when you enter Emacs.
  1031. The mode line of the displayed window shows the date and any holidays
  1032. that fall on that date.
  1033.  
  1034. 
  1035. File: emacs,  Node: Format of Diary File,  Next: Date Formats,  Prev: Diary Commands,  Up: Diary
  1036.  
  1037. The Diary File
  1038. --------------
  1039.  
  1040.    Your "diary file" is a file that records events associated with
  1041. particular dates.  The name of the diary file is specified by the
  1042. variable `diary-file'; `~/diary' is the default.  The `calendar'
  1043. utility program supports a subset of the format allowed by the Emacs
  1044. diary facilities, so you can use that utility to view the diary file,
  1045. with reasonable results aside from the entries it cannot understand.
  1046.  
  1047.    Each entry in the diary file describes one event and consists of one
  1048. or more lines.  An entry always begins with a date specification at the
  1049. left margin.  The rest of the entry is simply text to describe the
  1050. event.  If the entry has more than one line, then the lines after the
  1051. first must begin with whitespace to indicate they continue a previous
  1052. entry.  Lines that do not begin with valid dates and do not continue a
  1053. preceding entry are ignored.
  1054.  
  1055.    You can inhibit the marking of certain diary entries in the calendar
  1056. window; to do this, insert an ampersand (`&') at the beginning of the
  1057. entry, before the date.  This has no effect on display of the entry in
  1058. the diary window; it affects only marks on dates in the calendar
  1059. window.  Nonmarking entries are especially useful for generic entries
  1060. that would otherwise mark many different dates.
  1061.  
  1062.    If the first line of a diary entry consists only of the date or day
  1063. name with no following blanks or punctuation, then the diary window
  1064. display doesn't include that line; only the continuation lines appear.
  1065. For example, this entry:
  1066.  
  1067.      02/11/1989
  1068.            Bill B. visits Princeton today
  1069.            2pm Cognitive Studies Committee meeting
  1070.            2:30-5:30 Liz at Lawrenceville
  1071.            4:00pm Dentist appt
  1072.            7:30pm Dinner at George's
  1073.            8:00-10:00pm concert
  1074.  
  1075. appears in the diary window without the date line at the beginning.
  1076. This style of entry looks neater when you display just a single day's
  1077. entries, but can cause confusion if you ask for more than one day's
  1078. entries.
  1079.  
  1080.    You can edit the diary entries as they appear in the window, but it
  1081. is important to remember that the buffer displayed contains the *entire*
  1082. diary file, with portions of it concealed from view.  This means, for
  1083. instance, that the `C-f' (`forward-char') command can put point at what
  1084. appears to be the end of the line, but what is in reality the middle of
  1085. some concealed line.
  1086.  
  1087.    *Be careful when editing the diary entries!*  Inserting additional
  1088. lines or adding/deleting characters in the middle of a visible line
  1089. cannot cause problems, but editing at the end of a line may not do what
  1090. you expect.  Deleting a line may delete other invisible entries that
  1091. follow it.  Before editing the diary, it is best to display the entire
  1092. file with `s' (`show-all-diary-entries').
  1093.  
  1094. 
  1095. File: emacs,  Node: Date Formats,  Next: Adding to Diary,  Prev: Format of Diary File,  Up: Diary
  1096.  
  1097. Date Formats
  1098. ------------
  1099.  
  1100.    Here are some sample diary entries, illustrating different ways of
  1101. formatting a date.  The examples all show dates in American order
  1102. (month, day, year), but Calendar mode supports European order (day,
  1103. month, year) as an option.
  1104.  
  1105.      4/20/93  Switch-over to new tabulation system
  1106.      apr. 25  Start tabulating annual results
  1107.      4/30  Results for April are due
  1108.      */25  Monthly cycle finishes
  1109.      Friday  Don't leave without backing up files
  1110.  
  1111.    The first entry appears only once, on April 20, 1993.  The second and
  1112. third appear every year on the specified dates, and the fourth uses a
  1113. wildcard (asterisk) for the month, so it appears on the 25th of every
  1114. month.  The final entry appears every week on Friday.
  1115.  
  1116.    You can use just numbers to express a date, as in `MONTH/DAY' or
  1117. `MONTH/DAY/YEAR'.  This must be followed by a nondigit.  In the date
  1118. itself, MONTH and DAY are numbers of one or two digits.  The optional
  1119. YEAR is also a number, and may be abbreviated to the last two digits;
  1120. that is, you can use `11/12/1989' or `11/12/89'.
  1121.  
  1122.    Dates can also have the form `MONTHNAME DAY' or `MONTHNAME DAY,
  1123. YEAR', where the month's name can be spelled in full or abbreviated to
  1124. three characters (with or without a period).  Case is not significant.
  1125.  
  1126.    A date may be "generic"; that is, partially unspecified.  Then the
  1127. entry applies to all dates that match the specification.  If the date
  1128. does not contain a year, it is generic and applies to any year.
  1129. Alternatively, MONTH, DAY, or YEAR can be a `*'; this matches any
  1130. month, day, or year, respectively.  Thus, a diary entry `3/*/*' matches
  1131. any day in March of any year; so does `march *'.
  1132.  
  1133.    If you prefer the European style of writing dates--in which the day
  1134. comes before the month--type `M-x european-calendar' while in the
  1135. calendar, or set the variable `european-calendar-style' to `t' *before*
  1136. using any calendar or diary command.  This mode interprets all dates in
  1137. the diary in the European manner, and also uses European style for
  1138. displaying diary dates.  (Note that there is no comma after the
  1139. MONTHNAME in the European style.)  To go back to the (default) American
  1140. style of writing dates, type `M-x american-calendar'.
  1141.  
  1142.    You can use the name of a day of the week as a generic date which
  1143. applies to any date falling on that day of the week.  You can abbreviate
  1144. the day of the week to three letters (with or without a period) or spell
  1145. it in full; case is not significant.
  1146.  
  1147. 
  1148. File: emacs,  Node: Adding to Diary,  Next: Special Diary Entries,  Prev: Date Formats,  Up: Diary
  1149.  
  1150. Commands to Add to the Diary
  1151. ----------------------------
  1152.  
  1153.    While in the calendar, there are several commands to create diary
  1154. entries:
  1155.  
  1156. `i d'
  1157.      Add a diary entry for the selected date (`insert-diary-entry').
  1158.  
  1159. `i w'
  1160.      Add a diary entry for the selected day of the week
  1161.      (`insert-weekly-diary-entry').
  1162.  
  1163. `i m'
  1164.      Add a diary entry for the selected day of the month
  1165.      (`insert-monthly-diary-entry').
  1166.  
  1167. `i y'
  1168.      Add a diary entry for the selected day of the year
  1169.      (`insert-yearly-diary-entry').
  1170.  
  1171.    You can make a diary entry for a specific date by selecting that date
  1172. in the calendar window and typing the `i d' command.  This command
  1173. displays the end of your diary file in another window and inserts the
  1174. date; you can then type the rest of the diary entry.
  1175.  
  1176.    If you want to make a diary entry that applies to a specific day of
  1177. the week, select that day of the week (any occurrence will do) and type
  1178. `i w'.  This inserts the day-of-week as a generic date; you can then
  1179. type the rest of the diary entry.  You can make a monthly diary entry in
  1180. the same fashion.  Select the day of the month, use the `i m' command,
  1181. and type rest of the entry.  Similarly, you can insert a yearly diary
  1182. entry with the `i y' command.
  1183.  
  1184.    All of the above commands make marking diary entries by default.  To
  1185. make a nonmarking diary entry, give a numeric argument to the command.
  1186. For example, `C-u i w' makes a nonmarking weekly diary entry.
  1187.  
  1188.    When you modify the diary file, be sure to save the file before
  1189. exiting Emacs.
  1190.  
  1191.